﻿Public Class Ping

    Private Sub Desarrollador_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim ip As String
        Dim sw As New Stopwatch
        ip = "188.165.200.127"
        If My.Computer.Network.Ping(ip) Then
            sw.Start()
            My.Computer.Network.Ping(ip)
            sw.Stop()
            Label1.Text = "Tu ping con el servidor ESUS es..." & sw.ElapsedMilliseconds & "ms"
        Else
            Label1.Text = "No hay ping"
        End If
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim ip As String
        Dim sw As New Stopwatch
        ip = "188.165.200.127"
        If My.Computer.Network.Ping(ip) Then
            sw.Start()
            My.Computer.Network.Ping(ip)
            sw.Stop()
            Label1.Text = "Tu ping con el servidor ESUS es..." & sw.ElapsedMilliseconds & "ms"
        Else
            Label1.Text = "No hay ping"
        End If
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Me.Close()
    End Sub
End Class